
var suanli = echarts.init(document.getElementById('suanli'));
$.get('admin/Dashboard/suanli').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    suanli.setOption({
       // title: {
       //     text: '算力'
       // },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data:['算力','平均算力']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data['date']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name:'算力',
                type:'line',
                areaStyle: {normal: {
                   color:'#A1B0FD',
                }},
                lineStyle: {normal: {
                   color:'#A1B0FD',
                }},
                itemStyle: {normal: {
                   color:'#A1B0FD',
                }},
                stack: '总量1',
                data:data['value']
            },
            {
                name:'平均算力',
                type:'line',
                lineStyle: {normal: {
                    color:'#DC9F69',
                }},
                itemStyle: {normal: {
                    color:'#DC9F69',
                }},
                stack: '总量2',
                data:data['pjvalue']
            }

        ]
    });
});

var num = echarts.init(document.getElementById('number'));
$.get('admin/Dashboard/number').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    num.setOption({
        
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data:['ETH获得数']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data['date']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name:'ETH获得数',
                type:'line',
                stack: '总量',
                data:data['value']
            }
        ]
    });
});
var price = echarts.init(document.getElementById('price'));
$.get('admin/Dashboard/price').done(function(data) {
    data = eval("(" + data + ")");
    if (data == "") {
        die;
    }
    price.setOption({
        
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data:['交易价格']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data['date']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name:'交易价格',
                type:'line',
                stack: '总量',
                data:data['value']
            }
        ]
    });
});

